#coding=utf-8
from django.contrib import admin
from models import *
# Register your models here.
class Registeruser(admin.ModelAdmin): 
    list_display = ('id','username','sex','phone','password')
    fields = ('username','password','repassword', 'sex','phone')
    list_per_page = 20
class Download(admin.ModelAdmin):
    list_display = ('title','link','password','uploader','creatdate')
    fields = ('title','link','password','uploader')
    list_per_page = 20
class ArticleManange(admin.ModelAdmin):
    list_display = ('author','category','title','en_title','img','tags','summary','content','is_top','rank','zan_times','view_times')
    # fields = ('author','category','title','en_title','img','tags','summary','content','is_top','rank','zan_times','view_times')
    list_per_page = 20
class CategoryManange(admin.ModelAdmin):
    list_display = ('name','rank')
    fields = ('name','rank')
    list_per_page = 20
admin.site.register(register, Registeruser)
admin.site.register(download, Download)
admin.site.register(Article,ArticleManange)
admin.site.register(Category,CategoryManange)